package com.dragon.modules.yuegou.model.busd;

import com.dragon.modules.yuegou.entity.busd.OperationDataEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 商圈运营数据表模型类
 * 
 * @author pbuilder generated
 * @date 2019-12-27 15:08:16
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class OperationData extends OperationDataEntity {

	private static final long serialVersionUID = 1L;

	public static OperationData newInstance(String month) {
		OperationData stats = new OperationData();
		stats.month = month;
		stats.openRate = BigDecimal.ZERO;
		stats.customerFlow = 0;
		return stats;
	}
	
	/**
	 * 构造一个空商圈运营数据表模型对象
	 */
	public OperationData(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个商圈运营数据表模型对象
	 * 
	 * @param entity 实体对象
	 */
	public OperationData(OperationDataEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个商圈运营数据表模型对象
	 * 
	 * @param other 其它对象
	 */
	public OperationData(OperationData other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置
	 * 
	 * @param id 
	 * @return 当前对象
	 */
    public OperationData id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getBusdId() {
    	return busdId;
    }

    /**
	 * 设置商圈id
	 * 
	 * @param busdId 商圈id
	 * @return 当前对象
	 */
    public OperationData busdId(String busdId) {
    	this.busdId = busdId;
    	return this;
    }

	@Override
	public String getBusdName() {
    	return busdName;
    }

    /**
	 * 设置商圈名称
	 * 
	 * @param busdName 商圈名称
	 * @return 当前对象
	 */
    public OperationData busdName(String busdName) {
    	this.busdName = busdName;
    	return this;
    }

	@Override
	public BigDecimal getOpenRate() {
    	return openRate;
    }

    /**
	 * 设置开门营业率
	 * 
	 * @param openRate 开门营业率
	 * @return 当前对象
	 */
    public OperationData openRate(BigDecimal openRate) {
    	this.openRate = openRate;
    	return this;
    }

	@Override
	public Integer getCustomerFlow() {
    	return customerFlow;
    }

    /**
	 * 设置客流量
	 * 
	 * @param customerFlow 客流量
	 * @return 当前对象
	 */
    public OperationData customerFlow(Integer customerFlow) {
    	this.customerFlow = customerFlow;
    	return this;
    }

	@Override
	public String getMonth() {
    	return month;
    }

    /**
	 * 设置统计月份
	 * 
	 * @param month 统计月份
	 * @return 当前对象
	 */
    public OperationData month(String month) {
    	this.month = month;
    	return this;
    }
}
